<template>
  <div class="user-box">
    <div class="user-wrap">
      <div>
        <van-image round fit="cover" :src="user.user_img" />
      </div>
      <div class="edit">
        <div>
          <div>
            <p>1</p>
            <p class="gray">粉丝</p>
          </div>
          <div>
            <p>1</p>
            <p class="gray">关注</p>
          </div>
          <div>
            <p>1</p>
            <p class="gray">获赞 </p>
          </div>
        </div>
        <div @click="$router.push('/edit')">编辑资料</div>
      </div>
    </div>
    <van-cell-group :border="false">
      <van-cell :border="false">
        <div slot="title" class="name"> {{user.name}}</div>
      </van-cell>
      <van-cell>
        <div slot="title" class="gray"> {{user.user_desc}} </div>
        <span>展开</span>
      </van-cell>
    </van-cell-group>
  </div>
</template>
<script>
export default {
  props: {
    user: {
      type: Object,
      required: true
    }
  },
  data() {
    return {}
  }
}
</script>
<style lang="less" scoped>
.user-box {
  width: 100%;
  height: 250px;
  padding: 8px 0;
  background-color: #fff;
  font-size: 14px;
}
.user-wrap {
  height: 100px;
  display: flex;
  justify-content: space-between;
  .van-image {
    position: absolute;
    top: -20px;
    left: 14px;
    width: 80px;
    height: 80px;
  }
  > div {
    position: relative;
  }
}
.edit {
  margin-right: 14px;
  width: 230px;
  height: 80px;
  p {
    text-align: center;
  }
  > div:nth-child(1) {
    display: flex;
    justify-content: space-evenly;
    align-content: center;
    height: 40px;
  }
  > div:nth-child(2) {
    margin-top: 8px;
    border: 1px solid #fb7299;
    text-align: center;
    height: 30px;
    line-height: 30px;
    color: #fb7299;
    font-size: 20px;
  }
}
.name {
  font-size: 20px;
}
.gray {
  color: #ccc;
}
</style>
